package com.company.exp2.event.impl;

import com.company.exp2.context.Context;
import com.company.exp2.event.Event;
import com.company.exp2.station.Station;
import com.company.exp2.typeEnum.EventType;

/**
 * @author dyy
 */
public class ChannelTransmittableEvent extends Event {
    /**
     * @param timestamp         事件发生的时间戳
     * @param associatedStation 这个事件不存在相关站点，应该为null
     */
    public ChannelTransmittableEvent(long timestamp, Station associatedStation) {
        super(timestamp, associatedStation);
    }

    @Override
    public void occur() {
        Context.currentContext.onChannelTransmittable(getTimestamp());
    }

    @Override
    public EventType getEventType() {
        return EventType.CHANNEL_TRANSMITTABLE;
    }
}
